<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <meta name="csrf_token" id="token" content="{{ csrf_token() }}">
    @include('public.h5_head')
    <title>拒绝理由</title>
    <script src="{{ env('CDN_DOMAIN_NAME') }}/js/commonjs/rem.js"></script>
    <link rel="stylesheet" type="text/css" href="{{ env('CDN_DOMAIN_NAME') }}/css/commoncss/common.css"/>
    <style>
        #box_refuse{width:100%;height:100%;}
        .wrap{position: absolute;z-index: 1;top:0;bottom:0;left: 0;width: 100%;overflow:hidden;background:#f1f1f1;}
        .main_refuse{width:100%;height:auto;float:left;}
        .refuse{width:92%;margin:0.512rem 4%;height:1.6rem;background:#fff;-webkit-border-radius:0.2rem;-moz-border-radius:0.21rem;border-radius:0.2rem;}
        .refuse_sel{width:100%;height:100%;border:0;outline:none;background: #fff url(/img/xiala.png) no-repeat right center;background-size:6% 70%;padding-left:0.5rem;padding-right:1rem;font-size:0.64rem;color:#383838;-webkit-border-radius:0.2rem;-moz-border-radius:0.2rem;border-radius:0.2rem;}
        select:-moz-placeholder{color:#383838;font-size:0.64rem;}
        select:-ms-input-placeholder{color:#383838;font-size:0.64rem;}
        select::-webkit-input-placeholder{color:#383838;font-size:0.64rem;}
        .refuse_div{position:absolute;bottom:0;left:0;width:100%;height:2.112rem;line-height:2.112rem;font-size:0.768rem;color:#fff;text-align:center;z-index:1000;background:#1aad1a;}
        .refuse_hide{height:2.517rem;width:7.028rem;line-height:2.517rem;text-align:center;color:#fff;background:#000;opacity:0.8;filter:alpha(opacity=80);-moz-border-radius:0.427rem;-webkit-border-radius:0.427rem;border-radius:0.427rem;font-size:0.683rem;position: absolute;top:0;left:0;right:0;bottom:0;margin:auto;z-index:1000;}
    </style>
</head>
<script src="{{ env('CDN_DOMAIN_NAME') }}/js/app.js"></script>
<script src="{{ env('CDN_DOMAIN_NAME') }}/js/commonjs/common.js"></script>
<body>
<div id="box_refuse">
    <div class="wrap">
        <div class="main_refuse">
            <div class="refuse">
                <select class="refuse_sel">
                    <option value="">拒绝理由</option>
                    <option value="10397">区域饱和</option>
                    <option value="10400">存在代理商</option>
                    <option value="10398">已有签约客户</option>
                    <option value="10397">其他</option>
                </select>
            </div>
        </div>
    </div>
    <div class="refuse_div">提交</div>
    <div class="refuse_hide" style="display:none;"></div>
</div>
<script>
    is_weixn('.refuse_div');
    var user_id = '{{ $_GET['id'] }}';
    /*不通过*/
    $(".refuse_div").click(function(){
        var sms_code=$(".refuse_sel").val();
        if(sms_code==''){
            $('.refuse_hide').text('请选择拒绝理由');
            $('.refuse_hide').show().delay(500).hide(0);
            return false;
        }
        $.ajax({
            url:'sale-to-examine-user',
            type:'post',
            data:{
                status:-1,
                user_id:user_id,
                sms_code:sms_code
            },
            headers: {
                'X-CSRF-TOKEN': $('meta[name="csrf_token"]').attr('content')
            },
            dataType:'json',
            success:function(data){
                if(data.success){
                    $('.refuse_hide').text('操作成功');
                    $('.refuse_hide').show().delay(500).hide(0);
                    setTimeout(function(){
                        window.location.href='/toExamineList';
                    },500);
                }else{
                    $('.refuse_hide').text(data.msg);
                    $('.refuse_hide').show().delay(800).hide(0);
                }
            }
        })
    });
</script>
</body>
</html>
